﻿<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/common/taglibs.jsp" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="baidu-site-verification" content="pqPt5AF0KS" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>VChello SaaS-为机构服务的SaaS平台</title>
	<meta name="description" content="为机构及其成员提供收集、管理项目和其他服务的SaaS平台">
    <!--common-->
    <link href="/resources/src/css/main.css" rel="stylesheet">
    <style>
    	body{background-color:#11acfa; min-width:1024px;}

    </style>
</head>
<body>
	<img src="/resources/src/images/cl.png" class="img1"/>
	<img src="/resources/src/images/sd.png" class="img2"/>
	<img src="/resources/src/images/cl.png" class="img3"/>
	<img src="/resources/src/images/sd.png" class="img4"/>
	<img src="/resources/src/images/cl.png" class="img5"/>
	<img src="/resources/src/images/enter_bg.png" class="enter-bg" width="100%" height="auto" alt="最底层背景图片"/>
	<p class="copy-msg">粤ICP备14063324号<span></span>2014-2016VChello.con All rights reserved&<span></span>广州微投科技信息咨询有限公司所有</p>
    <div class="entrance_index_main">
    	<div class="entrance_index_header">
	        <div class="wrap">
	            <!--<a href="javascript:;">投递项目</a>-->
	            <a href="/login">登录/注册</a>
	        </div>
	    </div>
        <div class="content clearfix" style="position:relative;">
            <div class="content-lt pull-left">
            	<div class="index_logo">
	                <img src="/resources/src/images/index_logo.png" alt="VChello SaaS 网站 logo">
	            </div>
	            <div class="p_list">
	                <p>VChello Saas是为机构及其成员提供收集、管理项目和其他服务的平台。从投前、投中及投后切入流程化管理，降低投资人及机构内部管理项目的成本。</p>
	            </div>
	            <div class="apply_org_btn">机构申请入口</div>
            </div>
            <div class="content-rt">
            	<img src="/resources/src/images/enter_con.png" width="100%" height="auto" class="enter_con" />
            </div>
        </div>
        <div class="entrance_index_footer">
        	<img src="/resources/src/images/cloud.png" width="100%" height="auto" class="enter_footer_img"/>
        </div>
    </div>
    <div class="apply_window">
        <div class="title"><span>机构账号申请</span><i class="iconfont icon-shanchu close"></i></div>
        <form class="apply_form">
            <div class="item clearfix">
                <div class="item-label pull-left"><label class="lab" for="org_name">机构名称：</label></div>
                <div class="item-input pull-left">
                    <input type="text" id="agencyName" name="agencyName" placeholder="请输入机构名称" />
                </div>
            </div>
            <div class="item clearfix">
                <div class="item-label pull-left"><label class="lab" for="person_name">联系人姓名：</label></div>
                <div class="item-input pull-left">
                    <input type="text" id="contactsName" name="contactsName" placeholder="请输入联系人姓名" />
                </div>
            </div>
            <div class="item clearfix">
                <div class="item-label pull-left"><label class="lab" for="person_phone">联系人手机：</label></div>
                <div class="item-input pull-left">
                    <input type="text" id="phone" name="phone" placeholder="请输入11位有效手机号" />
                </div>
            </div>
            <div class="item clearfix">
                <div class="item-label pull-left"><label class="lab" for="person_email">联系人邮箱：</label></div>
                <div class="item-input pull-left">
                    <input type="text" id="email" name="email" placeholder="请输入您的邮箱" />
                </div>
            </div>
            <input type="submit" value="提交" class="apply_submit">
        </form>
    </div>
    <div class="apply_mark"></div>
    <script src="/resources/src/js/jquery-1.9.1.min.js"></script>
    <script src="/resources/src/js/jquery.validate.min.js"></script>
    <script src="/resources/src/js/messages_zh.js"></script>
    <script> 
        $(function(){
            $('.apply_org_btn').click(function(){showWindow()});
            $('.apply_window .title .close').click(function(){hideWindow()});    
        })
        function showWindow(){
            $('.apply_window,.apply_mark').stop().show();
        }
        function hideWindow(){
            $('.apply_window,.apply_mark').stop().hide();
        }
        $(".apply_form").validate({
            debug:true,
            rules: {
            	agencyName:{
                required:true
              }, 
              contactsName:{
                required:true
              }, 
              phone:{
                required:true,
                isPhone:true
              }, 
              email:{
                required:true,
                email:true
              }                 
            },
            messages: {
            	agencyName:{
                 required: "请输入机构名称",
               },
               contactsName:{
                 required: "请输入联系人名称",
               },
               phone:{
                 required: "请输入联系人手机",
               },
               email:{
                 required: "请输入联系人邮箱",
                 email:'请输入正确的邮箱'
               }
            },
            submitHandler:function(form){
            	var agencyName = $("#agencyName").val();
            	var contactsName = $("#contactsName").val();
            	var phone = $("#phone").val();
            	var email = $("#email").val();
            	$.ajax({
                	url : "/agency/apply",
        			type : "post",
        			dataType: "json",
        			data : {
        				"agencyName":agencyName,
        				"contactsName":contactsName,
        				"phone":phone,
        				"email":email
        			},
        			success: function(data) {
        				alert(data.data);
        				location.reload();
        			}
                })
                //hideWindow();
            }
        });
        jQuery.validator.addMethod("isPhone", function(value, element) {
            var phone = new RegExp(/^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/);
            return this.optional(element) || (phone.test(value));
        }, "请填写正确的手机号码");
    </script>
</body>
</html>